package com.xuerhua.yxt.common.enums;

public enum NoticeType {
	NOTICE_CLASS(1, "班级通知"),
	NOTICE_SUBJECT_GRADE(2, "科级通知"),
	NOTICE_FILEAROUND(3, "文件传阅"),
	NOTICE_EXECUTIVE(4, "学校通知"),
	NOTICE_HOMEWORK(5, "作业通知");
	
	private final int code;
	
	private final String value;
	
	private NoticeType(int code, String value) {
		this.code = code;
		this.value = value;
	}

	public static String getValue(int key) {
		for(NoticeType type : NoticeType.values()) {
			if(type.getCode() == key) {
				return type.getValue();
			}
		}
		return null;
	}
	
	public int getCode() {
		return code;
	}

	public String getValue() {
		return value;
	}
}
